﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HRM.Entity;

namespace HRM.DAL
{
    public class ContractTypeDAL:BaseDAL
    {
        public List<ContractType> GetAll()
        {
            return Repository.All<ContractType>().ToList();
        }

        public ContractType GetByID(int ID)
        {
            return Repository.Single<ContractType>(contract => contract.ID == ID);
        }

        public ContractType Add(ContractType item)
        {
            Repository.Add<ContractType>(item);
            return item;
        }

        public ContractType Update(ContractType item)
        {
            Repository.Update<ContractType>(item);
            return item;
        }

        public void Delete(int ID)
        {
            Repository.Delete<ContractType>(ID);
        }
    }
}
